﻿using UnityEngine;
using System.Collections;

namespace Lost{
	/// <summary>
	/// 小黄车锁
	/// </summary>
	public class YellowBikeKey : LockKey {
		public override string CurPassword {
			get {
				int len = values.Length;
				base.CurPassword = "";
				for (int i = 0; i < len; i++) {
					base.CurPassword += values [i];
				}
				return base.CurPassword;
			}
			set {
				base.CurPassword = value;
			}
		}
		[SerializeField] string[] values;
		[SerializeField] bool[] valids;

		public void ChangeValues(int[] indexs){
			foreach (int i in indexs) {
				valids [i] = !valids [i];
			}
		}
		public void ChangeValue(int index){
			valids [index] = !valids [index];
		}
	}
}
